<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html" charset="UTF-8">
<title>FixedOrderComparator (Apache Commons Collections 4.0 API)</title>
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
    if (location.href.indexOf('is-external=true') == -1) {
        parent.document.title="FixedOrderComparator (Apache Commons Collections 4.0 API)";
    }
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!--   -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/FixedOrderComparator.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/apache/commons/collections4/comparators/ComparatorChain.html" title="class in org.apache.commons.collections4.comparators"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../../org/apache/commons/collections4/comparators/FixedOrderComparator.UnknownObjectBehavior.html" title="enum in org.apache.commons.collections4.comparators"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/commons/collections4/comparators/FixedOrderComparator.html" target="_top">Frames</a></li>
<li><a href="FixedOrderComparator.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_top");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested_class_summary">Nested</a>&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!--   -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.commons.collections4.comparators</div>
<h2 title="Class FixedOrderComparator" class="title">Class FixedOrderComparator&lt;T&gt;</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>org.apache.commons.collections4.comparators.FixedOrderComparator&lt;T&gt;</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><a href="http://download.oracle.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/util/Comparator.html?is-external=true" title="class or interface in java.util">Comparator</a>&lt;T&gt;</dd>
</dl>
<hr>
<br>
<pre>public class <span class="strong">FixedOrderComparator&lt;T&gt;</span>
extends <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>
implements <a href="http://download.oracle.com/javase/6/docs/api/java/util/Comparator.html?is-external=true" title="class or interface in java.util">Comparator</a>&lt;T&gt;, <a href="http://download.oracle.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a></pre>
<div class="block">A Comparator which imposes a specific order on a specific set of Objects.
 Objects are presented to the FixedOrderComparator in a specified order and
 subsequent calls to <a href="../../../../../org/apache/commons/collections4/comparators/FixedOrderComparator.html#compare(T, T)"><code>compare</code></a> yield that order.
 For example:
 <pre>
 String[] planets = {"Mercury", "Venus", "Earth", "Mars"};
 FixedOrderComparator distanceFromSun = new FixedOrderComparator(planets);
 Arrays.sort(planets);                     // Sort to alphabetical order
 Arrays.sort(planets, distanceFromSun);    // Back to original order
 </pre>
 <p>
 Once <code>compare</code> has been called, the FixedOrderComparator is locked
 and attempts to modify it yield an UnsupportedOperationException.
 <p>
 Instances of FixedOrderComparator are not synchronized.  The class is not
 thread-safe at construction time, but it is thread-safe to perform
 multiple comparisons  after all the setup operations are complete.
 <p>
 This class is Serializable from Commons Collections 4.0.</div>
<dl><dt><span class="strong">Since:</span></dt>
  <dd>3.0</dd>
<dt><span class="strong">Version:</span></dt>
  <dd>$Id: FixedOrderComparator.java 1479344 2013-05-05 15:48:01Z tn $</dd>
<dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../serialized-form.html#org.apache.commons.collections4.comparators.FixedOrderComparator">Serialized Form</a></dd></dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="nested_class_summary">
<!--   -->
</a>
<h3>Nested Class Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Nested Class Summary table, listing nested classes, and an explanation">
<caption><span>Nested Classes</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Class and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static class&nbsp;</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/collections4/comparators/FixedOrderComparator.UnknownObjectBehavior.html" title="enum in org.apache.commons.collections4.comparators">FixedOrderComparator.UnknownObjectBehavior</a></strong></code>
<div class="block">Unknown object behavior enum.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_summary">
<!--   -->
</a>
<h3>Constructor Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../../../org/apache/commons/collections4/comparators/FixedOrderComparator.html#FixedOrderComparator()">FixedOrderComparator</a></strong>()</code>
<div class="block">Constructs an empty FixedOrderComparator.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><strong><a href="../../../../../org/apache/commons/collections4/comparators/FixedOrderComparator.html#FixedOrderComparator(java.util.List)">FixedOrderComparator</a></strong>(<a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="../../../../../org/apache/commons/collections4/comparators/FixedOrderComparator.html" title="type parameter in FixedOrderComparator">T</a>&gt;&nbsp;items)</code>
<div class="block">Constructs a FixedOrderComparator which uses the order of the given list
 to compare the objects.</div>
</td>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../../../org/apache/commons/collections4/comparators/FixedOrderComparator.html#FixedOrderComparator(T...)">FixedOrderComparator</a></strong>(<a href="../../../../../org/apache/commons/collections4/comparators/FixedOrderComparator.html" title="type parameter in FixedOrderComparator">T</a>...&nbsp;items)</code>
<div class="block">Constructs a FixedOrderComparator which uses the order of the given array
 to compare the objects.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!--   -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/collections4/comparators/FixedOrderComparator.html#add(T)">add</a></strong>(<a href="../../../../../org/apache/commons/collections4/comparators/FixedOrderComparator.html" title="type parameter in FixedOrderComparator">T</a>&nbsp;obj)</code>
<div class="block">Adds an item, which compares as after all items known to the Comparator.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/collections4/comparators/FixedOrderComparator.html#addAsEqual(T, T)">addAsEqual</a></strong>(<a href="../../../../../org/apache/commons/collections4/comparators/FixedOrderComparator.html" title="type parameter in FixedOrderComparator">T</a>&nbsp;existingObj,
          <a href="../../../../../org/apache/commons/collections4/comparators/FixedOrderComparator.html" title="type parameter in FixedOrderComparator">T</a>&nbsp;newObj)</code>
<div class="block">Adds a new item, which compares as equal to the given existing item.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/collections4/comparators/FixedOrderComparator.html#checkLocked()">checkLocked</a></strong>()</code>
<div class="block">Checks to see whether the comparator is now locked against further changes.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/collections4/comparators/FixedOrderComparator.html#compare(T, T)">compare</a></strong>(<a href="../../../../../org/apache/commons/collections4/comparators/FixedOrderComparator.html" title="type parameter in FixedOrderComparator">T</a>&nbsp;obj1,
       <a href="../../../../../org/apache/commons/collections4/comparators/FixedOrderComparator.html" title="type parameter in FixedOrderComparator">T</a>&nbsp;obj2)</code>
<div class="block">Compares two objects according to the order of this Comparator.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/collections4/comparators/FixedOrderComparator.html#equals(java.lang.Object)">equals</a></strong>(<a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;object)</code>
<div class="block">Returns <code>true</code> iff <i>that</i> Object is
 is a <a href="http://download.oracle.com/javase/6/docs/api/java/util/Comparator.html?is-external=true" title="class or interface in java.util"><code>Comparator</code></a> whose ordering is known to be
 equivalent to mine.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../../org/apache/commons/collections4/comparators/FixedOrderComparator.UnknownObjectBehavior.html" title="enum in org.apache.commons.collections4.comparators">FixedOrderComparator.UnknownObjectBehavior</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/collections4/comparators/FixedOrderComparator.html#getUnknownObjectBehavior()">getUnknownObjectBehavior</a></strong>()</code>
<div class="block">Gets the behavior for comparing unknown objects.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/collections4/comparators/FixedOrderComparator.html#hashCode()">hashCode</a></strong>()</code>
<div class="block">Implement a hash code for this comparator that is consistent with
 <a href="../../../../../org/apache/commons/collections4/comparators/FixedOrderComparator.html#equals(java.lang.Object)"><code>equals</code></a>.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/collections4/comparators/FixedOrderComparator.html#isLocked()">isLocked</a></strong>()</code>
<div class="block">Returns true if modifications cannot be made to the FixedOrderComparator.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/collections4/comparators/FixedOrderComparator.html#setUnknownObjectBehavior(org.apache.commons.collections4.comparators.FixedOrderComparator.UnknownObjectBehavior)">setUnknownObjectBehavior</a></strong>(<a href="../../../../../org/apache/commons/collections4/comparators/FixedOrderComparator.UnknownObjectBehavior.html" title="enum in org.apache.commons.collections4.comparators">FixedOrderComparator.UnknownObjectBehavior</a>&nbsp;unknownObjectBehavior)</code>
<div class="block">Sets the behavior for comparing unknown objects.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!--   -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!--   -->
</a>
<h3>Constructor Detail</h3>
<a name="FixedOrderComparator()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>FixedOrderComparator</h4>
<pre>public&nbsp;FixedOrderComparator()</pre>
<div class="block">Constructs an empty FixedOrderComparator.</div>
</li>
</ul>
<a name="FixedOrderComparator(java.lang.Object[])">
<!--   -->
</a><a name="FixedOrderComparator(T...)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>FixedOrderComparator</h4>
<pre>public&nbsp;FixedOrderComparator(<a href="../../../../../org/apache/commons/collections4/comparators/FixedOrderComparator.html" title="type parameter in FixedOrderComparator">T</a>...&nbsp;items)</pre>
<div class="block">Constructs a FixedOrderComparator which uses the order of the given array
 to compare the objects.
 <p>
 The array is copied, so later changes will not affect the comparator.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>items</code> - the items that the comparator can compare in order</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the array is null</dd></dl>
</li>
</ul>
<a name="FixedOrderComparator(java.util.List)">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>FixedOrderComparator</h4>
<pre>public&nbsp;FixedOrderComparator(<a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="../../../../../org/apache/commons/collections4/comparators/FixedOrderComparator.html" title="type parameter in FixedOrderComparator">T</a>&gt;&nbsp;items)</pre>
<div class="block">Constructs a FixedOrderComparator which uses the order of the given list
 to compare the objects.
 <p>
 The list is copied, so later changes will not affect the comparator.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>items</code> - the items that the comparator can compare in order</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the list is null</dd></dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!--   -->
</a>
<h3>Method Detail</h3>
<a name="isLocked()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isLocked</h4>
<pre>public&nbsp;boolean&nbsp;isLocked()</pre>
<div class="block">Returns true if modifications cannot be made to the FixedOrderComparator.
 FixedOrderComparators cannot be modified once they have performed a comparison.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>true if attempts to change the FixedOrderComparator yield an
  UnsupportedOperationException, false if it can be changed.</dd></dl>
</li>
</ul>
<a name="checkLocked()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>checkLocked</h4>
<pre>protected&nbsp;void&nbsp;checkLocked()</pre>
<div class="block">Checks to see whether the comparator is now locked against further changes.</div>
<dl><dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/UnsupportedOperationException.html?is-external=true" title="class or interface in java.lang">UnsupportedOperationException</a></code> - if the comparator is locked</dd></dl>
</li>
</ul>
<a name="getUnknownObjectBehavior()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getUnknownObjectBehavior</h4>
<pre>public&nbsp;<a href="../../../../../org/apache/commons/collections4/comparators/FixedOrderComparator.UnknownObjectBehavior.html" title="enum in org.apache.commons.collections4.comparators">FixedOrderComparator.UnknownObjectBehavior</a>&nbsp;getUnknownObjectBehavior()</pre>
<div class="block">Gets the behavior for comparing unknown objects.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd><a href="../../../../../org/apache/commons/collections4/comparators/FixedOrderComparator.UnknownObjectBehavior.html" title="enum in org.apache.commons.collections4.comparators"><code>FixedOrderComparator.UnknownObjectBehavior</code></a></dd></dl>
</li>
</ul>
<a name="setUnknownObjectBehavior(org.apache.commons.collections4.comparators.FixedOrderComparator.UnknownObjectBehavior)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setUnknownObjectBehavior</h4>
<pre>public&nbsp;void&nbsp;setUnknownObjectBehavior(<a href="../../../../../org/apache/commons/collections4/comparators/FixedOrderComparator.UnknownObjectBehavior.html" title="enum in org.apache.commons.collections4.comparators">FixedOrderComparator.UnknownObjectBehavior</a>&nbsp;unknownObjectBehavior)</pre>
<div class="block">Sets the behavior for comparing unknown objects.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>unknownObjectBehavior</code> - the flag for unknown behaviour -
 UNKNOWN_AFTER, UNKNOWN_BEFORE or UNKNOWN_THROW_EXCEPTION</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/UnsupportedOperationException.html?is-external=true" title="class or interface in java.lang">UnsupportedOperationException</a></code> - if a comparison has been performed</dd>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the unknown flag is not valid</dd></dl>
</li>
</ul>
<a name="add(java.lang.Object)">
<!--   -->
</a><a name="add(T)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>add</h4>
<pre>public&nbsp;boolean&nbsp;add(<a href="../../../../../org/apache/commons/collections4/comparators/FixedOrderComparator.html" title="type parameter in FixedOrderComparator">T</a>&nbsp;obj)</pre>
<div class="block">Adds an item, which compares as after all items known to the Comparator.
 If the item is already known to the Comparator, its old position is
 replaced with the new position.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>obj</code> - the item to be added to the Comparator.</dd>
<dt><span class="strong">Returns:</span></dt><dd>true if obj has been added for the first time, false if
  it was already known to the Comparator.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/UnsupportedOperationException.html?is-external=true" title="class or interface in java.lang">UnsupportedOperationException</a></code> - if a comparison has already been made</dd></dl>
</li>
</ul>
<a name="addAsEqual(java.lang.Object,java.lang.Object)">
<!--   -->
</a><a name="addAsEqual(T, T)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addAsEqual</h4>
<pre>public&nbsp;boolean&nbsp;addAsEqual(<a href="../../../../../org/apache/commons/collections4/comparators/FixedOrderComparator.html" title="type parameter in FixedOrderComparator">T</a>&nbsp;existingObj,
                 <a href="../../../../../org/apache/commons/collections4/comparators/FixedOrderComparator.html" title="type parameter in FixedOrderComparator">T</a>&nbsp;newObj)</pre>
<div class="block">Adds a new item, which compares as equal to the given existing item.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>existingObj</code> - an item already in the Comparator's set of
  known objects</dd><dd><code>newObj</code> - an item to be added to the Comparator's set of
  known objects</dd>
<dt><span class="strong">Returns:</span></dt><dd>true if newObj has been added for the first time, false if
  it was already known to the Comparator.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if existingObject is not in the
  Comparator's set of known objects.</dd>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/UnsupportedOperationException.html?is-external=true" title="class or interface in java.lang">UnsupportedOperationException</a></code> - if a comparison has already been made</dd></dl>
</li>
</ul>
<a name="compare(java.lang.Object,java.lang.Object)">
<!--   -->
</a><a name="compare(T, T)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>compare</h4>
<pre>public&nbsp;int&nbsp;compare(<a href="../../../../../org/apache/commons/collections4/comparators/FixedOrderComparator.html" title="type parameter in FixedOrderComparator">T</a>&nbsp;obj1,
          <a href="../../../../../org/apache/commons/collections4/comparators/FixedOrderComparator.html" title="type parameter in FixedOrderComparator">T</a>&nbsp;obj2)</pre>
<div class="block">Compares two objects according to the order of this Comparator.
 <p>
 It is important to note that this class will throw an IllegalArgumentException
 in the case of an unrecognised object. This is not specified in the
 Comparator interface, but is the most appropriate exception.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/util/Comparator.html?is-external=true#compare(T, T)" title="class or interface in java.util">compare</a></code>&nbsp;in interface&nbsp;<code><a href="http://download.oracle.com/javase/6/docs/api/java/util/Comparator.html?is-external=true" title="class or interface in java.util">Comparator</a>&lt;<a href="../../../../../org/apache/commons/collections4/comparators/FixedOrderComparator.html" title="type parameter in FixedOrderComparator">T</a>&gt;</code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>obj1</code> - the first object to compare</dd><dd><code>obj2</code> - the second object to compare</dd>
<dt><span class="strong">Returns:</span></dt><dd>negative if obj1 is less, positive if greater, zero if equal</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if obj1 or obj2 are not known
  to this Comparator and an alternative behavior has not been set
  via <a href="../../../../../org/apache/commons/collections4/comparators/FixedOrderComparator.html#setUnknownObjectBehavior(org.apache.commons.collections4.comparators.FixedOrderComparator.UnknownObjectBehavior)"><code>setUnknownObjectBehavior(UnknownObjectBehavior)</code></a>.</dd></dl>
</li>
</ul>
<a name="hashCode()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hashCode</h4>
<pre>public&nbsp;int&nbsp;hashCode()</pre>
<div class="block">Implement a hash code for this comparator that is consistent with
 <a href="../../../../../org/apache/commons/collections4/comparators/FixedOrderComparator.html#equals(java.lang.Object)"><code>equals</code></a>.</div>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</a></code>&nbsp;in class&nbsp;<code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></dd>
<dt><span class="strong">Returns:</span></dt><dd>a hash code for this comparator.</dd></dl>
</li>
</ul>
<a name="equals(java.lang.Object)">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>equals</h4>
<pre>public&nbsp;boolean&nbsp;equals(<a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;object)</pre>
<div class="block">Returns <code>true</code> iff <i>that</i> Object is
 is a <a href="http://download.oracle.com/javase/6/docs/api/java/util/Comparator.html?is-external=true" title="class or interface in java.util"><code>Comparator</code></a> whose ordering is known to be
 equivalent to mine.
 <p>
 This implementation returns <code>true</code>
 iff <code><i>that</i></code> is a <a href="../../../../../org/apache/commons/collections4/comparators/FixedOrderComparator.html" title="class in org.apache.commons.collections4.comparators"><code>FixedOrderComparator</code></a>
 whose attributes are equal to mine.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/util/Comparator.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.util">equals</a></code>&nbsp;in interface&nbsp;<code><a href="http://download.oracle.com/javase/6/docs/api/java/util/Comparator.html?is-external=true" title="class or interface in java.util">Comparator</a>&lt;<a href="../../../../../org/apache/commons/collections4/comparators/FixedOrderComparator.html" title="type parameter in FixedOrderComparator">T</a>&gt;</code></dd>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</a></code>&nbsp;in class&nbsp;<code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>object</code> - the object to compare to</dd>
<dt><span class="strong">Returns:</span></dt><dd>true if equal</dd></dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!--   -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/FixedOrderComparator.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/apache/commons/collections4/comparators/ComparatorChain.html" title="class in org.apache.commons.collections4.comparators"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../../org/apache/commons/collections4/comparators/FixedOrderComparator.UnknownObjectBehavior.html" title="enum in org.apache.commons.collections4.comparators"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/commons/collections4/comparators/FixedOrderComparator.html" target="_top">Frames</a></li>
<li><a href="FixedOrderComparator.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_bottom");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested_class_summary">Nested</a>&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!--   -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright &#169; 2001&#x2013;2013 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</body>
</html>
